<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<header th:replace="admin/header::header-fragment">
</header>
<body class="hold-transition sidebar-mini">
<div class="wrapper">
    <!-- 引入页面头header-fragment -->
    <div th:replace="admin/header::header-nav"></div>
    <!-- 引入工具栏sidebar-fragment -->
    <div th:replace="admin/sidebar::sidebar-fragment(${path})"></div>
    <!-- Content Wrapper. Contains 图标content -->
    <div class="content-wrapper">
        <!-- Content Header (图标header) -->
        <div class="content-header">
            <div class="container-fluid">
            </div><!-- /.container-fluid -->
        </div>
        <!-- Main content -->
        <div class="content">
            <div class="container-fluid">
                <div class="card card-primary card-outline">
                    <div class="card-header">
                        <h3 class="card-title">分类管理</h3>
                    </div> <!-- /.card-body -->
                    <div class="card-body">
                        <div class="grid-btn">
                            <button class="btn btn-info" onclick="categoryAdd()"><i
                                    class="fa fa-plus"></i>&nbsp;新增
                            </button>
                            <button class="btn btn-info" onclick="categoryEdit()"><i
                                    class="fa fa-pencil-square-o"></i>&nbsp;修改
                            </button>
                            <button class="btn btn-danger" onclick="deleteCagegory()"><i
                                    class="fa fa-trash-o"></i>&nbsp;删除
                            </button>
                        </div>
                        <br>
                        <table id="jqGrid" class="table table-bordered">
                        </table>
                        <div id="jqGridPager"></div>
                    </div><!-- /.card-body -->
                </div>
            </div><!-- /.container-fluid -->
        </div>
        <!-- /.content -->
        <div class="content">
            <!-- 模态框（Modal） -->
            <div class="modal fade" id="categoryModal" tabindex="-1" role="dialog" aria-labelledby="categoryModalLabel">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                    aria-hidden="true">&times;</span></button>
                            <h6 class="modal-title" id="categoryModalLabel">Modal</h6>
                        </div>
                        <div class="modal-body">
                            <form id="categoryForm">
                                <div class="form-group">
                                    <div class="alert alert-danger" id="edit-error-msg" style="display: none;">
                                        错误信息展示栏。
                                    </div>
                                </div>
                                <input type="hidden" class="form-control" id="categoryId" name="categoryId">
                                <div class="form-group">
                                    <label for="categoryName" class="control-label">分类名称:</label>
                                    <input type="text" class="form-control" id="categoryName" name="categoryName"
                                           placeholder="请输入分类名称" required="true">
                                </div>
                                <div class="form-group">
                                    <label for="categoryIcon" class="control-label">分类图标:</label>
                                    <select class='form-control select2 image-picker' id="categoryIcon"
                                            name="categoryIcon">
                                        <option data-img-src='/admin/dist/img/newcategory/00.png'
                                                value='/admin/dist/img/newcategory/00.png'> 默认图标
                                        </option>
                                        <option data-img-src='/admin/dist/img/newcategory/01.png'
                                                value='/admin/dist/img/newcategory/01.png'> 图标1
                                        </option>
                                        <option data-img-src='/admin/dist/img/newcategory/02.png'
                                                value='/admin/dist/img/newcategory/02.png'> 图标2
                                        </option>
                                        <option data-img-src='/admin/dist/img/newcategory/03.png'
                                                value='/admin/dist/img/newcategory/03.png'> 图标3
                                        </option>
                                        <option data-img-src='/admin/dist/img/newcategory/04.png'
                                                value='/admin/dist/img/newcategory/04.png'> 图标4
                                        </option>
                                        <option data-img-src='/admin/dist/img/newcategory/05.png'
                                                value='/admin/dist/img/newcategory/05.png'> 图标5
                                        </option>
                                        <option data-img-src='/admin/dist/img/newcategory/06.png'
                                                value='/admin/dist/img/newcategory/06.png'> 图标6
                                        </option>
                                        <option data-img-src='/admin/dist/img/newcategory/07.png'
                                                value='/admin/dist/img/newcategory/07.png'> 图标7
                                        </option>
                                        <option data-img-src='/admin/dist/img/newcategory/08.png'
                                                value='/admin/dist/img/newcategory/08.png'> 图标8
                                        </option>
                                        <option data-img-src='/admin/dist/img/newcategory/09.png'
                                                value='/admin/dist/img/newcategory/09.png'> 图标9
                                        </option>
                                        <option data-img-src='/admin/dist/img/newcategory/10.png'
                                                value='/admin/dist/img/newcategory/10.png'> 图标10
                                        </option>
                                        <option data-img-src='/admin/dist/img/newcategory/11.png'
                                                value='/admin/dist/img/newcategory/11.png'> 图标11
                                        </option>
                                        <option data-img-src='/admin/dist/img/newcategory/12.png'
                                                value='/admin/dist/img/newcategory/12.png'> 图标12
                                        </option>
                                        <option data-img-src='/admin/dist/img/newcategory/13.png'
                                                value='/admin/dist/img/newcategory/13.png'> 图标13
                                        </option>
                                        <option data-img-src='/admin/dist/img/newcategory/14.png'
                                                value='/admin/dist/img/newcategory/14.png'> 图标14
                                        </option>
                                        <option data-img-src='/admin/dist/img/newcategory/15.png'
                                                value='/admin/dist/img/newcategory/15.png'> 图标15
                                        </option>
                                        <option data-img-src='/admin/dist/img/newcategory/16.png'
                                                value='/admin/dist/img/newcategory/16.png'> 图标16
                                        </option>
                                        <option data-img-src='/admin/dist/img/newcategory/17.png'
                                                value='/admin/dist/img/newcategory/17.png'> 图标17
                                        </option>
                                        <option data-img-src='/admin/dist/img/newcategory/18.png'
                                                value='/admin/dist/img/newcategory/18.png'> 图标18
                                        </option>
                                        <option data-img-src='/admin/dist/img/newcategory/19.png'
                                                value='/admin/dist/img/newcategory/19.png'> 图标19
                                        </option>
                                    </select>
                                </div>

                            </form>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                            <button type="button" class="btn btn-primary" id="saveButton">确认</button>
                        </div>
                    </div>
                </div>
            </div>
            <!-- /.modal -->
        </div>
    </div>
    <!-- /.content-wrapper -->
    <!-- 引入页脚footer-fragment -->
    <div th:replace="admin/footer::footer-fragment"></div>
</div>
<!-- jQuery -->
<script th:src="@{/admin/plugins/jquery/jquery.min.js}"></script>
<!-- jQuery UI 1.11.4 -->
<script th:src="@{/admin/plugins/jQueryUI/jquery-ui.min.js}"></script>
<!-- Bootstrap 4 -->
<script th:src="@{/admin/plugins/bootstrap/js/bootstrap.bundle.min.js}"></script>
<!-- AdminLTE App -->
<script th:src="@{/admin/dist/js/adminlte.min.js}"></script>
<!-- jqgrid -->
<script th:src="@{/admin/plugins/jqgrid-5.5.2/jquery.jqGrid.min.js}"></script>
<script th:src="@{/admin/plugins/jqgrid-5.5.2/grid.locale-cn.js}"></script>
<!-- image-picker -->
<script th:src="@{/admin/plugins/image-picker/query.masonry.min.js}"></script>
<script th:src="@{/admin/plugins/image-picker/image-picker.min.js}"></script>
<!-- sweetalert -->
<script th:src="@{/admin/plugins/sweetalert/sweetalert.min.js}"></script>
<script th:src="@{/admin/dist/js/public.js}"></script>
<script th:src="@{/admin/dist/js/category.js}"></script>
</body>

<!--烟花特效资源-->
<script th:src="@{/blog/default/js/yhtx.js}"></script>
</html>
